package com.youlu.campus.web.order.controller;

import com.youlu.campus.web.order.service.GoodsService;
import com.yuelin.infrastructure.quantum.common.QResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 商品相关控制器
 * @author zgz
 * @date 2020/11/8 16:20
 */
@RestController
@Slf4j
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    /**
     * 获取商品信息
     * @param goodsCode
     * @return
     */
    @GetMapping("/mini-app/goods/info")
    public QResult getGoodsByCode(String goodsCode){
        return QResult.success(goodsService.getGoodsByCode(goodsCode));
    }



}
